
	{if $fields['loc']}
        <div class="weui_cell">
            <div class="weui_cell_bd weui_cell_primary">
				<textarea class="weui_textarea" name="field_{$fields['refid']}_{$fields['bind']}" rows="2" placeholder="{$fields['tixing']}" {if $fields['essential']}required tips="{$fields['tixing']}"{/if}>{$fields['default']}</textarea>
                <div class="weui_textarea_counter">
					<a href="javascript:void(0);" onclick="getLocation(this,'field_{$fields['refid']}_{$fields['bind']}');" style="position: absolute;bottom:5px;right:10px;">
						<svg class="icon f18" aria-hidden="true">
							<use xlink:href="#icon-Geo-fence"></use>
						</svg>
					</a>
				</div>
            </div>
        </div>
	{else}
        <div class="weui_cell">
            <div class="weui_cell_bd weui_cell_primary">
			<textarea class="weui_textarea" name="field_{$fields['refid']}_{$fields['bind']}" rows="3" placeholder="{$fields['tixing']}" {if $fields['essential']}required tips="{$fields['tixing']}"{/if}>{$fields['default']}</textarea>
                <div class="weui_textarea_counter {if $fields['essential']}weui-start{/if}"><span id="textarea_num">{$fields['title']} 限800字</span></div>
            </div>
        </div>
	<script>
	$(function(){
		$(".weui_textarea").on("input paste" , function(){
			var num_left=$(this).val().length;
			if((800-num_left)<0){
				$("#textarea_num").text("超出"+(num_left-800)+"字");
				$("#textarea_num").css("color","#E44443");
			}else{
				$("#textarea_num").text((num_left)+"字");
				$("#textarea_num").css("color","#999999");
			}
		});
	})
	</script>
	{/if}